#!/usr/bin/python
import logging
import logging.config
# load my module
# load the logging configuration
import os.path

class log():
    def debug(self,debuginfo):
        LOGGING_CONF=os.path.join(os.path.dirname(__file__),"logconf.ini")
        logging.config.fileConfig(LOGGING_CONF)
        # create logger
        logger = logging.getLogger("Debug")
        logger.debug(debuginfo)
        
    def info(self,debuginfo):
        LOGGING_CONF=os.path.join(os.path.dirname(__file__),"logconf.ini")
        logging.config.fileConfig(LOGGING_CONF)
        # create logger
        logger = logging.getLogger("Info")
        logger.info(debuginfo)
    
    def Warning(self,debuginfo):
        LOGGING_CONF=os.path.join(os.path.dirname(__file__),"logconf.ini")
        logging.config.fileConfig(LOGGING_CONF)
        # create logger
        logger = logging.getLogger("Warning")
        logger.warning(debuginfo)
    
    def criticl(self,debuginfo):
        LOGGING_CONF=os.path.join(os.path.dirname(__file__),"logconf.ini")
        logging.config.fileConfig(LOGGING_CONF)
        # create logger
        logger = logging.getLogger("CRITICAL")
        logger.critical(debuginfo)
    